public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        //mySingleList.createLink();
//        mySingleList.display();
//        System.out.println("===========");
//        mySingleList.display();
//        System.out.println("===========");
//        System.out.println("=====测试尾插======");
//        mySingleList.addLast(10);
//        mySingleList.addLast(20);
//        mySingleList.addLast(30);
//        mySingleList.display();
        System.out.println("===测试插入===");
        mySingleList.addLast(1);
        mySingleList.addLast(2);
        mySingleList.addLast(3);
        mySingleList.addLast(4);
//        mySingleList.addIndex(12,99);
//        mySingleList.display();

        try{
            mySingleList.addIndex(0,99);
        }catch(IndexOutOfException e){
            e.printStackTrace();
        }
        mySingleList.display();
        System.out.println("======");
        mySingleList.remove(99);
        mySingleList.display();
        mySingleList.remove(1);
        mySingleList.display();


    }
}
